home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
STRINGS
/
PACKAGE6
/
FILE.DOC
< prev
next >
Wrap
Text File
|
1990-07-25
|
1KB
|
40 lines
-----------------------------------------------------------------------------
ReadlnFromFile
-----------------------------------------------------------------------------
declaration: procedure ReadLnFromFile (var InFile:
text;
var AString:
TypeString);
purpose: To read from the Infile a string of characters and to put in
a packed array. Length shall be = to the number of elements in
the array
preconditions: AString declared. InFile has been opened (if necessary) and
is available to read from.
postConditions: AString Filled with either an empty set if InFile is empty,
or is filled with characters in InFile up to End of Line
special cases: none
example: var
AString:
TypeString;
AnyFile:
text;
begin
.
.
.
write (output,'Getting name from file: ');
ReadlnString (AnyFile, AString);
.
.
.
end
-----------------------------------------------------------------------------